//  Copyright (c) 2008  Yoong-ki Ahn & Youngjin Kim < mexif@googlegroups.com>
//  See the enclosed file COPYING for license information (MIT Licence).
//  If you did not receive this file,
//  see http://www.opensource.org/licenses/mit-license.php.

#ifndef _MEXIF_LIB_H_
#define _MEXIF_LIB_H_

#ifdef __cplusplus
extern "C"
{
#endif

#define MEXIF_API		__stdcall

#ifndef _MEXIFLIB_INSIDE
#    define MEXIF_EXTERN		extern
#else
#    define MEXIF_EXTERN
#endif


/// to use <crtdbg.h> and _ASSERTE(), define MEXIF_USE_WINDOWS_ASSERT.
/// to use <assert.h> and assert(),   define MEXIF_USE_STANDARD_ASSERT.
#if defined(_DEBUG)
#    define     MEXIF_USE_WINDOWS_ASSERT
//#    define     MEXIF_USE_STANDARD_ASSERT
#endif

#ifdef _UNICODE
#    define		MEXIF_UNICODE(x)		L ## x
#else
#    define		MEXIF_UNICODE(x)		x
#endif

#ifndef _WCHAR_T_DEFINED
	typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif

typedef	const wchar_t*		mexif_pcstr;
typedef unsigned __int16	mexif_uint16;
typedef unsigned __int32	mexif_uint32;
typedef signed	 __int32	mexif_int32;
typedef unsigned __int64	mexif_uint64;
typedef signed	 __int64	mexif_int64;

typedef enum
{
	MEXIF_FALSE				= 0,
	MEXIF_TRUE				= 1,
} mexif_bool;



#if		defined(MEXIF_USE_STANDARD_ASSERT)
#   include <assert.h>
#   define MEXIF_ASSERT		assert
#elif	defined(MEXIF_USE_WINDOWS_ASSERT)
#   include <crtdbg.h>
#   define MEXIF_ASSERT		_ASSERTE
#else
#   define MEXIF_ASSERT(x)	((void) 0)
#endif


#ifdef __cplusplus
}
#endif


#include "mexif_def.h"
#include "mexif_tagdb.h"
#include "mexif_jpeg.h"
#include "mexif_util.h"
#include "mexif_exif.h"


#endif

